from apiflask import APIBlueprint
from schema.device import DeviceInSchema,DeviceOutSchema

devices = APIBlueprint('device',__name__,url_prefix='/device')

from modules import device

@devices.get('/get/<id>')
@devices.doc(summary='获取设备', description='获取设备信息')
def getDeviceInfo(id:str):
    return device.get(id)

@devices.post('/add')
@devices.doc(summary='添加设备', description='新增设备信息（存在该设备 则更新设备信息）')
def addDeviceInfo():
    return device.get()